package com.songjia.springcloud.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.songjia.common.model.po.Dept;

/**
 * 
 * 
 * @Description: 部门Mapper接口
 *
 * @author: songjia
 * @date: 2018年8月30日 下午8:00:31
 */
public interface DeptMapper {

	@Select("select * from t_dept where id = #{id}")
	Dept getById(@Param("id") Long id);

	@Insert("insert into t_dept (name, database) values(#{name}, DATABASE())")
	int add(Dept dept);

	@Select("select * from t_dept")
	List<Dept> getAll();

}
